package design.factory.simpleFactory;

import design.factory.Audi;
import design.factory.Byd;
import design.factory.Car;

public class CarFactory {

    public static Car createCar(String type){
        if("奥迪".equals(type)){
            return  new Audi();
        }else if("比亚迪".equals(type)){
            return new Byd();
        }else{
            return null;
        }
    }
}
